home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-07-18 | 3.9 KB | 119 lines |
- /*
- * @(#)HttpServletRequest.java 1.13 97/05/22
- *
- * Copyright (c) 1995-1997 Sun Microsystems, Inc. All Rights Reserved.
- *
- * This software is the confidential and proprietary information of Sun
- * Microsystems, Inc. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Sun.
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
- * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
- * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
- * THIS SOFTWARE OR ITS DERIVATIVES.
- *
- * CopyrightVersion 1.0
- */
-
- package javax.servlet.http;
-
- import javax.servlet.ServletRequest;
- import java.util.Enumeration;
-
- /**
- * This interface represents an HTTP servlet request. It gets data
- * from the client to the servlet for use in the service method. It
- * allows the HTTP-protocol specified header information to be accessed
- * from the service method.
- *
- * @version 1.13, 05/22/97
- * @author David Connelly
- */
- public
- interface HttpServletRequest extends ServletRequest {
- /**
- * Returns the method with which the request was made. The returned
- * value can be "GET", "HEAD", "POST", or an extension method. Same
- * as the CGI variable REQUEST_METHOD.
- */
- public String getMethod();
-
- /**
- * Returns the request URI as a URL object.
- */
- public String getRequestURI();
-
- /**
- * Returns the part of the request URI that refers to the servlet
- * being invoked. Analogous to the CGI variable SCRIPT_NAME.
- */
- public String getServletPath();
-
- /**
- * Returns optional extra path information following the servlet
- * path, but immediately preceding the query string. Returns null if
- * not specified. Same as the CGI variable PATH_INFO.
- */
- public String getPathInfo();
-
- /**
- * Returns extra path information translated to a real path. Returns
- * null if no extra path information specified. Same as the CGI variable
- * PATH_TRANSLATED.
- */
- public String getPathTranslated();
-
- /**
- * Returns the query string part of the servlet URI, or null if none.
- * Same as the CGI variable QUERY_STRING.
- */
- public String getQueryString();
-
- /**
- * Returns the name of the user making this request, or null if not
- * known. The user name is set with HTTP authentication. Whether
- * the user name will continue to be sent with each subsequent
- * communication is browser-dependent. Same as the CGI variable
- * REMOTE_USER.
- */
- public String getRemoteUser();
-
- /**
- * Returns the authentication scheme of the request, or null if none.
- * Same as the CGI variable AUTH_TYPE.
- */
- public String getAuthType();
-
- /**
- * Returns the value of a header field, or null if not known.
- * The case of the header field name is ignored.
- * @param name the case-insensitive header field name
- */
- public String getHeader(String name);
-
- /**
- * Returns the value of an integer header field, or -1 if not found.
- * The case of the header field name is ignored.
- * @param name the case-insensitive header field name
- */
- public int getIntHeader(String name);
-
- /**
- * Returns the value of a date header field, or -1 if not found.
- * The case of the header field name is ignored.
- * @param name the case-insensitive header field name
- */
- public long getDateHeader(String name);
-
- /**
- * Returns an enumeration of strings representing the header names
- * for this request. Some server implementations do not allow headers
- * to be accessed in this way, in which case this method will return null.
- */
- public Enumeration getHeaderNames();
- }
-